package zombiegame;

public class Weapon {

    private String type; 
    private int nbUses;
    private TypeCharacter target;

    /*Type d'arme a shotgun can stun an attacking zombie for some given number of turns; no effect on vampires though. Can be used until out of ammunition.
	liquid nitrogen will kill a zombie. Can be used until runs out.
	a wooden stake will definitively kill a vampire. Can only be used once.
	Vampires and zombies pursue humans, not each other. Vampires are faster*/

    public Weapon (String type, int nbUses, TypeCharacter target){
        this.type = type;
        this.nbUses = nbUses;
        this.target = target;
    }

    public String getType(){
        String type = this.type;
        return type;
    }

    public int getNbUses(){
        int nb = this.nbUses;
        return nb;
    }

    public TypeCharacter getTarget(){
        TypeCharacter target = this.target;
        return target;
    }

    public void setType(String type){
        this.type = type;
    }

    public void setNbUses(int nbUses){
        this.nbUses = nbUses;
    }

    public void setTarget(TypeCharacter target){
        this.target = target;
    }

    public boolean available(){
        return (this.nbUses > 0);
    }

    public void use(Character c) {
        this.nbUses--;
    }

}
